/**
 * 
 */
package idv.takeshi.software.productline.bookstore.application.service;

import java.util.Set;

import idv.takeshi.software.productline.bookstore.domain.model.book.Book;
import idv.takeshi.software.productline.bookstore.domain.model.category.Category;

/**
 * A service for bookstore browsing operation.
 * @author takeshi
 *
 */
public interface BrowseBooksService {
	
	/**
	 * Get root category.
	 * @return
	 */
	public Category getRootCategory();

	/**
	 * Get book by id.
	 * @param id
	 * @return
	 */
	public Book getBookById(Long id);
	
	/**
	 * Get books by given arguments.
	 * @param isBestSellers
	 * @param pageNo
	 * @param booksAmountPerPage
	 * @param category
	 * @return
	 */
	public Set<Book> getBooksByPageNoAndBookAmountPerPage(
			boolean isBestSellers, int pageNo, int booksAmountPerPage, Category category);
	
	/**
	 * Get books by given arguments.
	 * @param keyWord
	 * @param pageNo
	 * @param booksAmountPerPage
	 * @return
	 */
	public Set<Book> getBooksByPageNoAndBookAmountPerPage(
			String keyWord, int pageNo, int booksAmountPerPage);
	
	
	/**
	 * Get matched books amount by given keyWord.
	 * @param keyWord
	 * @return
	 */
	public int getBooksAmount(String keyWord);
	
}
